#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QMouseEventTransition>
#include<QMouseEvent>
#include <QPoint>
#include <QGraphicsDropShadowEffect>
#include <btform.h>
#include <QRect>
#include <QCoreApplication>
#include <QDir>
#include <QJsonArray>
#include <QJsonObject>
#include <cstdlib>
#include <ctime>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();
    void initUI();
    void conncetSignalAndSlot();

public slots:
    //定义一个槽函数，当一个左侧按钮被点击时，清除其他左侧按钮的效果
    void onBtFromClicked(int id);


private slots:
    void on_quit_clicked();
    //加载图片路径和名字到Josn结构中
    QJsonArray RandomPicture();
protected:

    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void defaultRec();


private:
    Ui::Widget *ui;
    QPoint dragPosition;//鼠标与窗口的相对距离

};
#endif // WIDGET_H
